import request from '@/utils/request'

//查询后台相册列表 /admin/album/list
export function getAlbumList(params) {
  return request({
    url: '/admin/album/list',
    method: 'get',
    params
  })
}

//删除相册 /admin/album/delete/{albumId}
export function deleteAlbum(id) {
  return request({
    url: '/admin/album/delete/'+id,
    method: 'delete',
  })
}

//上传相册封面


//添加相册
export function addAlbum(data) {
  return request({
    url: '/admin/album/add',
    method: 'post',
    data
  })
}

//编辑相册 /admin/album/edit/{albumId}
export function editAlbum(id) {
  return request({
    url: '/admin/album/edit/'+id,
    method: 'get',
  })
}

//更新相册 /admin/album/update
export function updateAlbum(data) {
  return request({
    url: '/admin/album/update',
    method: 'put',
    data
  })
}
